import { observer } from "mobx-react";
import counter from "./store/counter";

function App() {
  // 读取数据

  const handleIncrement = () => {
    counter.increment(1);
  };

  const handleDecrement = () => {
    counter.count--;
  };

  return (
    <div>
      <p>count: {counter.count}</p>
      <button onClick={handleIncrement}>+</button>
      <button onClick={handleDecrement}>-</button>
    </div>
  );
}

export default observer(App);
